<template>
  <div id="app">
    <router-view/>
  </div>
</template>
<script>
export default {
  name:'App',
  methods:{
    ch_sc(w) {
      console.log(w)
      if (w > 1600 && w < 1700) {
        document.body.style.zoom = '0.85'
      } else if (w > 1500 && w < 1600) {
        document.body.style.zoom = '0.75'
      } else if (w > 1400 && w < 1500) {
        document.body.style.zoom = '0.65'
      } else if (w > 1200 && w < 1300) {
        document.body.style.zoom = '0.65'
      } else if (w > 1100 && w < 1200) {
        document.body.style.zoom = '0.55'
      }
    }
  },
  mounted() {
    let w = document.body.clientWidth
    let that = this
    this.ch_sc(w)
    window.onresize = () => {
      return (() => {
        w = document.body.clientWidth
        if(w < 1920){
          that.ch_sc(w)
        }
      })();
    };
  }
}
</script>
<style>
#app{
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}
</style>
